package com.eliaukjq.jqrpc.serializer;

import java.io.IOException;

/**
 * @Author : 佩萁
 * Description :
 * @Create : 2024/2/23 - 13:17
 */
public interface Serializer {
    /**
     * 序列化
     * @param object
     * @return
     */
    <T> byte[] serialize(T object) throws IOException;

    /**
     * 反序列化
     * @param bytes
     */
    <T> T deserialize(byte[] bytes, Class<T> type) throws IOException;
}
